package com.hackordie.bindables;

import javax.validation.constraints.Min;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

import org.hibernate.validator.constraints.NotEmpty;

import com.hackordie.constants.EComponentsType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType
@XmlRootElement
public class BindableComponent {
    //////////////////////////
    // propio de AComponent //
    //////////////////////////
    @XmlElement
    @NotEmpty
    private String componentName;

    @XmlElement
    private EComponentsType componentType;

    @XmlElement
    @Min(0)
    private int energyToTurnOn;

    @XmlElement
    @Min(1)
    private int prize;
    
    ///////////////////////////
    // especifico de subcomp //
    ///////////////////////////

    @XmlElement
    private int dificultAccess;    //Firewall

    @XmlElement
    private int totalCapacity;    //HardDisk, RamMemory

    @XmlElement
    private int speedConection;   //NetworkCard
    
    @XmlElement
    private int generatedEnergy;  //PowerSupply
    
    @XmlElement
    private int speedForCore;     //Processor
    
    @XmlElement
    private int cores;            //PRocessor
    

    public BindableComponent() {

    }

    public BindableComponent(String componentName,
            EComponentsType componentType, int energyToTurnOn, int prize,
            int dificultAccess, int totalCapacity, int speedConection,
            int generatedEnergy, int speedForCore, int cores) {
        super();
        this.componentName = componentName;
        this.componentType = componentType;
        this.energyToTurnOn = energyToTurnOn;
        this.prize = prize;
        this.dificultAccess = dificultAccess;
        this.totalCapacity = totalCapacity;
        this.speedConection = speedConection;
        this.generatedEnergy = generatedEnergy;
        this.speedForCore = speedForCore;
        this.cores = cores;
    }

    public String getComponentName() {
        return componentName;
    }

    public void setComponentName(String componentName) {
        this.componentName = componentName;
    }

    public EComponentsType getComponentType() {
        return componentType;
    }

    public void setComponentType(EComponentsType componentType) {
        this.componentType = componentType;
    }

    public int getEnergyToTurnOn() {
        return energyToTurnOn;
    }

    public void setEnergyToTurnOn(int energyToTurnOn) {
        this.energyToTurnOn = energyToTurnOn;
    }

    public int getPrize() {
        return prize;
    }

    public void setPrize(int prize) {
        this.prize = prize;
    }

    public int getDificultAccess() {
        return dificultAccess;
    }

    public void setDificultAccess(int dificultAccess) {
        this.dificultAccess = dificultAccess;
    }

    public int getTotalCapacity() {
        return totalCapacity;
    }

    public void setTotalCapacity(int totalCapacity) {
        this.totalCapacity = totalCapacity;
    }

    public int getSpeedConection() {
        return speedConection;
    }

    public void setSpeedConection(int speedConection) {
        this.speedConection = speedConection;
    }

    public int getGeneratedEnergy() {
        return generatedEnergy;
    }

    public void setGeneratedEnergy(int generatedEnergy) {
        this.generatedEnergy = generatedEnergy;
    }

    public int getSpeedForCore() {
        return speedForCore;
    }

    public void setSpeedForCore(int speedForCore) {
        this.speedForCore = speedForCore;
    }

    public int getCores() {
        return cores;
    }

    public void setCores(int cores) {
        this.cores = cores;
    }    
    
    
}